<#include "/macro.include"/>
<#assign className = table.className>
<#assign classNameLower = className?uncap_first>
[#include "/admin/common/head.ftl"]
<div class="page-header">
    <h1> ${className}管理 <small> <i class="ace-icon fa fa-angle-double-right"></i> 列表 </small> </h1>
</div>
<!-- /.page-header -->
<div class="row">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <div class="row">
            <div class="col-xs-12">

                <div class="well">
                    <form id="searchForm" action="list.jhtml" method="post" >
                        <table class="width100">
                            <tbody>
                            <tr>
                                <#list table.notPkColumns as column>
                                <#if column.pk>
                                <#else>
                                <td class="textR w100">${column.columnNameLower}：</td>
                                <td class="w100">
                                    <input type="text" value="<@jspEl "${classNameLower}.${column.columnNameFirstLower}"/>" name="${column.columnNameLower}" class="w180">
                                </td>
                                </#if>
                                </#list>
                                <td class="vam" rowspan="2">
                                    <input type="submit" value="查询"  class="btn btn-primary btn-sm">
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>

                <!-- form search start-->
                <div class="btn-group mb10">
                    <a href="javascript:;" id="toFormPage" class="btn btn-primary btn-sm"><i class="icon-plus"></i> 新建</a>
                </div>

                <table id="simple-table" class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th class="center col-sm-1">序号</th>
                        <th>名称</th>
                        <th>年龄</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    [#if page.content?has_content]
                        [#list page.content as ${classNameLower}]
                        <tr>
                            <td class="center col-sm-1">   <@jspEl "${classNameLower}_index+1" />   </td>
                            <#list table.notPkColumns as column>
                            <td>   <@jspEl "${classNameLower}.${column.columnNameFirstLower}"/> </td>
                            </#list>
                            <td>
                                <a href="toFormPage.jhtml?id=<#list table.compositeIdColumns as column><@jspEl "${classNameLower}.${column.columnNameFirstLower}" /></#list>" >修改</a>
                                <a href="toDetailPage.jhtml?id=<#list table.compositeIdColumns as column><@jspEl "${classNameLower}.${column.columnNameFirstLower}" /></#list>" >详情</a>
                                <a class="deleteButton" title="<#list table.compositeIdColumns as column><@jspEl "${classNameLower}.${column.columnNameFirstLower}" /></#list>">删除</a>
                            </td>
                        </tr>
                        [/#list]
                    [#else]
                    <tr>
                        <td class="center" colspan="8">没有相关记录</td>
                    </tr>
                    [/#if]
                    </tbody>
                </table>
            [#include "/admin/common/pagination.ftl"]
            </div>
            <!-- /.span -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /.col -->
</div>
<!-- /.row -->
<script src="/resources/admin/js/moudle/${classNameLower}.js"></script>
[#include "/admin/common/bottom.ftl"]